<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<link rel="stylesheet" type="text/css" href="resources/js/jquery/jmultiselect/jquery.multiselect.css" />
<link rel="stylesheet" type="text/css" href="resources/js/jquery/jmultiselect/jquery-ui.css" />
<script type="text/javascript" src="resources/js/jquery/jmultiselect/jquery-ui.min.js"></script>
<script type="text/javascript" src="resources/js/jquery/jmultiselect/jquery.multiselect.js"></script>

<script>
	$(function(){
		multi_visible("dialog_usrRole", null, null, "选择用户角色权限");
	});
</script>

<div class="pageContent">
	<form method="post" action="app/system/account.do?action=actionSavaUser" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);" id="formMFunc">
		<div class="pageFormContent" layoutH="56">
			<table cellspacing="10" cellpadding="10" class="dform">
				<tr>
					<td>用户账号：</td>
					<td>
						<input name="userNo" error_message="该账号已存在..." type="text" size="30" value="${entity ne null ? entity.userNo : ''}" class="required" style="width: 88%" remote="app/system/account.do?action=actionUniqueCheckUserNo&force_ajax"/>
					</td>
				</tr>
				<tr>
					<td>用户姓名：</td>
					<td><input name="username" type="text" size="30" value="${entity ne null ? entity.username : ''}" class="required" style="width: 88%"/></td>
				</tr>
				<tr>
					<td>联系电话：</td>
					<td><input name="userPhoneNumber" type="text" size="30" value="${entity ne null ? entity.userPhoneNumber : ''}" style="width: 88%" /></td>
				</tr>
				<tr>
					<td>邮箱地址：</td>
					<td><input name="userMail" class="email" type="text" size="30" value="${entity ne null ? entity.userMail : ''}" style="width: 88%" /></td>
				</tr>
				<tr>
					<td style="width: 80px;">用户角色：</td>
					<td>
						<select multiple="multiple" class="required" name="roleId" id="dialog_usrRole">
							<logic:present name="allRoles">
								<logic:iterate name="allRoles" id="role">
									<option value="${role.id}" ${entity ne null && tm:inRange(entity.roleId, role.id, ',') ? 'selected' : ''}>${role.roleName}</option>
								</logic:iterate>
							</logic:present>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="right"><span style="color:#999; margin-top: 5px;display:inline-block;">初始密码与用户账号一致...</span></td>
				</tr>
			</table>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
		<input type="hidden" name="id" value="${entity ne null ? entity.id : '-1'}" />
	</form>
<div>